package com.jugheadzhou.core.message.rabbitmq.producer.callback;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.connection.CorrelationData;
import org.springframework.amqp.rabbit.core.RabbitTemplate;

/**
 * 消息发送成功的回调
 *
 * @author jugheadzhou
 * @date 2021-12-03
 */
@Slf4j
public class RabbitDefaultConfirmCallBack implements RabbitTemplate.ConfirmCallback {

    @Override
    public void confirm(CorrelationData correlationData, boolean ack, String cause) {
        log.info("消息唯一标识: {}\n确认状态: {}\n造成原因: {}", correlationData, ack, cause);
    }

}
